<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>微信授权登录</title>
    <link rel="stylesheet" href="../blog/layui/css/layui.css">
</head>
<style>
    body{
        background-color: #c2c2c2;
    }
</style>
<body>
    <div>
        <div style="text-align: center;margin: 100px auto">
            <h1>请用微信扫描二维码，关注后点击按钮登录</h1>
            <span class="layui-row"><img src="../image/weixin.png" class="layui-col-xs6 layui-col-sm6 layui-col-md6 layui-col-md-offset3 layui-col-xs-offset3 layui-col-sm-offset3"></span>
            <button id="btn" class="layui-btn" style="margin: 10px">登录跳转</button>
        </div>
    </div>
<script src="../blog/layui/layui.js"></script>
<script>
    //一般直接写在一个js文件中
    layui.use(['layer', 'form'], function(){
        var $=layui.$;
        $.wechat=function () {
            window.location.replace("http://codelong.natapp1.cc/wechat/authorize?returnUrl=/article");
        };
        $("#btn").click($.wechat);
    });
</script>
</body>
</html>